<?php

namespace Bigspender\DefaultBundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;

class MovimentationType extends AbstractType
{
	public function buildForm(FormBuilderInterface $builder, array $options)
	{
		$builder->add(
	        'inflow', 
	        'checkbox', 
	        array(
	            'required' => true, 
	            'attr' => 
	                array(
	                    'class' => 'form-control'
	                )
	        )
	    );

		$builder->add(
			'value', 
			'money', 
			array(
				'required' => true, 
				'attr' => 
					array(
						'class' => 'form-control'
					)
			)
		);

		$builder->add(
			'description', 
			'textarea', 
			array(
				'required' => true, 
				'attr' => 
					array(
						'class' => 'form-control'
					)
			)
		);

		$builder->add(
			'reference', 
			'date', 
			array(
				'required' => true, 
				'attr' => 
					array(
						'class' => 'form-control'
					)
			)
		);

		$builder->add(
			'send', 
			'submit', 
			array(
				'attr' => 
					array(
						'class' => 'btn btn-success'
					)
			)
		);
	}

	public function getName()
	{
		return 'movimentation';
	}
}
